<?php

class Application_Form_Signup extends Zend_Form
{

    public function init()
    {
        $this->setMethod('post');
        
        $this->addElement('text', 'login', array(
            'label'         => 'Login:',
            'required'      => true,
            'filters'       => array('StringTrim', 'StringToLower'),
            'validators'    => array(
                'Alnum',
                array('StringLength', false, array(3,21)),
                )    
        ));
        
        $this->addElement('text', 'email', array(
            'label'         => 'email:',
            'required'      => true,
            'filters'       => array('StringTrim', 'StringToLower'),
            'validators'    => array(
                'EmailAddress',
                array('StringLength', false, array(3,128)),
                )    
        ));
        
        $this->addElement('password', 'password', array(
            'label'         => 'Password:',
            'required'      => true,
            'filters'       => array('StringTrim'),
            'validators'    => array(
                array('StringLength', false, array(3,21)),
                )    
        ));
        
        $this->addElement('password', 'verification', array(
            'label'         => 'Verification:',
            'required'      => true,
            'filters'       => array('StringTrim'),
            'validators'    => array(
                array('StringLength', false, array(3,21)),
                )    
        ));
        
        $this->addElement('submit', 'submit', array(
            'label'      => 'Log In',
            'required'      => false,
            'ignore'      => true
        ));
        
    }


}

